Skip to content

fix(id/web/markdown): fence/HTML-first blockquotes count as content for alert restore (#7563) - #8715

Merged
dezren39 merged 1 commit into
mainfrom
queue/14445-7563-alert-fence-first
Nov 11, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/14445-7563-alert-fence-first

Conversation

@dezren39

@dezren39 dezren39 commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Fixes #7563.

PR #3740's save-side restore_github_alert_markers unescapes a GitHub alert marker only when it is the first content of its blockquote — but the fence-interior, HTML-interior, and fence/HTML opening-line branches of the scan never marked quote_has_content. A blockquote whose first block is a fenced code block or an HTML block therefore still counted as "empty" when a later paragraph began, and a standalone escaped marker line there (authored literal text) was unescaped with its hard-break backslash stripped — silently rewriting authored text on save.

All four branches now mark the quote levels up to the block's depth as having content, via a small mark_quote_content helper next to the existing ancestor-marking loops.

Regression tests:

  • fence-first blockquote followed by a literal marker line, end-to-end as a save fixpoint (two_saves);
  • HTML-first blockquote, pinned directly on the restore scan (the renderer splits an HTML-first quote ahead of the marker paragraph into a separate blockquote, where the marker legitimately is first content, so the scan-level oracle is the correct one there).

Both tests fail with the fix stashed and pass with it. Full web::markdown suite: 288/288 pass (cargo test --lib --features web web::markdown::), including the existing #3740 fixpoint tests — genuine alerts still restore.

Queue task 14445, lane code-c.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…or alert restore (#7563)

restore_github_alert_markers only unescapes an alert marker when it is the first content of its blockquote, but the fence-interior, HTML-interior, and fence/HTML opening-line branches never marked quote_has_content: a blockquote starting with a fenced code block or an HTML block still counted as empty when a later paragraph began, so a standalone escaped marker line there (authored literal text, with hard break) was unescaped and its hard-break backslash stripped. All four branches now mark the quote levels up to the block depth as having content (mark_quote_content). Regression tests pin the fence-first case end-to-end as a save fixpoint and the HTML-first case directly on the restore scan; both fail without the fix. All 288 web::markdown tests pass.
@dezren39

Copy link
Copy Markdown
Member Author

@codex review

New PR for #7563: fence/HTML-first blockquotes count as content in the alert-marker restore scan. Please review head 2f2593d. (Queue worker lane code-c, task 14445.)

@coderabbitai

coderabbitai Bot commented Nov 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 4 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8a1c6f11-7b16-4579-92cb-fcd699e2c6d4
Commits

Reviewing files that changed from the base of the PR and between 40043bc and 2f2593d.

Files selected for processing: 2

  • pkgs/id/src/web/markdown.rs
  • pkgs/id/src/web/markdown/markdown_serialization.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T15:07:33.272676Z 2f2593d Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 2f2593d337

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@dezren39
dezren39 merged commit 8a11587 into main Nov 11, 2026
3 of 21 checks passed
@dezren39
dezren39 deleted the queue/14445-7563-alert-fence-first branch November 11, 2026 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant